﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FaceSharp.Api.GraphApi
{
    public class GraphResult<T>
    {
        private readonly string rawResult;
        private readonly Func<string,T> converter;

        public GraphResult(string rawResult, Func<string, T> converter)
        {
            this.rawResult = rawResult;
            this.converter = converter;
        }
        
        public string RawResult
        {
            get {return rawResult;}
        }

        public T Results
        {
            get { return converter(rawResult); }
        }
    }
}
